Adding submit functionality