adding db functionality for testing