updated the database to change names and implemented the database
contract class