pan2D and panCV functions implemented