added grid; fixed issue #7