adding stdin n out in assignment 2