messy now for part 1
messy now for part 1
implemented pipe for different client