using Cursor to fetch data stored in db