changed numObstacles to 8 to prevent overlap