create model and initialise in index.html