Updated interaction with DB