added some panning stuff