a vanilla js MVC approach