implementation of hook form submit