add framework for database retrieval