initial full code