In case anyone else finds this topic and is looking for a more optimized (and more complicated) solution, I recommend reading this post.
In case anyone else finds this topic and is looking for a more optimized (and more complicated) solution, I recommend reading this post.