added a new function to db manipulation