adapted to work with a uniform mesh