nicer handles, more dynamic bin size adjustment code