added tests and grapes
fixed form validation