added comments, added close