added submit functionality