added support for more smaller grid sizes