removed type redefinitions of stdout and err. refactored code to removed an used values