added and improved comments