Updated work with DB