modified/added to support modal