correct function for next sub