working submission code