added better whitespace checks for api adder