code reviewed, some warnings suppressed
possibility of returning single result for a query added
initial commit