added some validation to lab 5 inputs, and output format