fixes to panning stuff use delegate