modified sumbmit script