Changed format to a ternary. Tested and code still worked - which means I transformed the code correctly into ternary format.