Added nextBox function