working version for sortable and draggable