partial work towards a new tailcall mechanism