some fix and improved example