transforming hexadecimal values into proper python values