added structure and factory pattern for the forms