Implemented tee

Fix #45.