final version running an example