remove end mark