maybe working? commented inserttoquad because it was the cause of the recursion problem