adjustements to work with new database