working out initial conditional logic