fixed minor bug and added comments