removed allow_attach (useless) and added validation for drag and drop