playing with tail call optimisation