fighting with data types and encoding