replace before all to before each statement to pass builds