updated code for prelim tests of change_bin