resolves returning multiple rows in the query