Finished output and input; made framework for logic