implement goto n