extended example with typedef and using