re-added the returning loop