removed dither, method Limit() instead of macro BOUND()