indexing bug
reducing memory usage of 2d search by maximizing internally