lots of initial code