Upgraded the code to V2.0