implemented panning