test loop now works