Modified the pdf formating and added some boundary conditions