adding viability input and output

lots of copy pasta in here, will need to come through and refactor a
bunch after we figure out the app