add the implementation of bin from coordinate ranges