example optimisation

tweaking the example