cleanup - 'then' should come last