change some wrong comment and add a similar solution with 2-d bool matrix