added submit button and related functionality