added comments and fixed #18