fixed up input/output