added tee, fixed small bug in the in PE3