code for get data