make sure 'next' can be called only one time