added missing code.Code is working and producing expected results
Merge branch 'master' of https://github.com/HPSCProject/Code