adapted some examples