updated modal window code