Please review and add comments . I have made changes and added a patch.