Updated example 2 with latest ecs