diff function for 2 submit