merge prev & next disabler into a single function
minor code reshuffle