refactor
Database Query