implemented the drag feature on an image