using tee instead of >>