custom backPress listener; SQLite queries