Codes from Xize

Shashank, please accept this pull request. I added the codes.