adding get data functionality