added contract class for database