changed format conversation of hex to binary to a method that would work