added test loop