refactored for performance

the next and release methods are computed once at class initialization
time