Could move these initialisations into the conditional below