modified .all to return array of object literals(or array of strings, depending on the number of attributes) when attributes are given