added onDrag functions