bug fixes and commets added