added support for flexible grid width