modified for modal usage