It's a pretty complicated problem. Can your share how you solve this?