added gridMapWidth and gridMapHeight arguments