implemented global scaling / bin search