Pseudo Coded controller and created document on ready

psuedocoded controller