make the sign of return values match the specs