new example with tails
some changes