adjusted the code to standards
Updated with pull request