datatype: cleaned up code