moved clickdrag to proper function