Added getData method to retrive data