dynamically generate submit button
clean up whitespace