created both programs, completely untested