code for pre project and the outputs