Added command line input and output