fix submit button action. TODOs