smart modal work