added synchronization for pipes and filters