implemented submitting and displaying preview merge