better handling of data obj