tested a the database and added test methods