refacotring to use Dao and cursorAdapter class