changes as suggested by @dianakhuang and @jbau

@chrisndodge Kindly review the changeset.

Thanks
kindly review the changes. I have updated the code

Thanks