reworked, using React and approach from https://www.youtube.com/watch?v=x8mmAu7ZR9Y