comments and minor bug fix