added work with database