refactored to include result array rather than using Results function