adding grid class and updated obstaclesearch