added and improved some comments