rewrote 'input' and 'output' to avoid using enum and char conversions
updated test files