modal open/hide function changed.