fixed correct handling of comments, added example program