change submit method and fix test