Added option to change grid dimensions