added a class for the form and polymorphism