updated code
Merge pull request #427 from Qwinix/issue_422

updated code