don't use recursive loop