Updated modal functions