improvements + example 6