this is the class that working with database