introduces result struct instead of difficult-to-read parameters