move condition to break the loop to the for loop condition check
remove redundancy when reading file permissions rwxrwxrwx = (octal) 0777 = (binary) 111111111, so we need to bit-shift 0 times to check for user permissions, 3 times to check for group permissions and 6 times to check for other permissions