fixed the sql to hold names