Sounds like an interesting project!
I got the idea, but I think its not optimised. I'm also kinda lazy to do the coding