updated sample with some of the last improvements