changed logic in 4x8 if statement to use standard c++ operators (&&,||) instead of and and or