changed method to return empty array if there are no results.