implement db level methods. ready for test