problem entering commands and reading it's output