updated work with new database