snatizing the code of create submit