implement internal loop test