adding functionality to support modal