added test functions

added suggestion on server.py - split utility functions into utils.py and query functions to db.py