Added recursive looping