remove goto warning and tests