move sub to the end