Change the code for work with the database