refered to the wrong function for submit event