Implemented preSubmitHandler