changed query select to name columns rather than *