Update index.php

this is a very "high level" concept of how we should be building some of this.