add dragging functionality
but still doesnt have good performance