This is what you can use. It's super simple with no or very few edge cases.