1. change lambda expr to functor
2. instead of read in all points, read in no more than 1e4 point every time
3. polish INSIDE code