peak finding in 1d and 2d