Updated to prevent program output to terminal window