Input and Output work correctly