updated complex example