Added functions for the db handler