program producing correct outputs when ran in terminal