cleaned up data_conversion so that it now works