updated pull request with changes based on feed back.