fixed another bug
added comments