added redirection to stdout