Created the nextPlace() function.