replace test loop with individual statements