https://ideas.creativecasinoties.com/post/first-and-last-occurrences-2jh62s