added support for von Neumann neighborhood