modifying surangas' pull request accoring to comments on pull request 470