made changes acording to pull request