modified for the suggetions on the pull request