add interface to use variable dimension grid