edits to module file-adding function to handle submit