changed handling of validation button