add comments, bug fixes