Modify code to use hex/strings instead of ints