implemented interaction with database in methods get and put