Added 'then' option called at the end.