Drag and drop updated. Pattern length introduced.