added support for input/output.