solved p4,p5 for cs262 and updated some formatting