formatting input/output for assignment