Added input and output code for console