few changes - code and comments