add pipes and implement kill method