Replace then to thenDo