all Fergal sample code