android refactor with cursors