updated bsaed on feedback from pull request