segfaults, need to debug first pipe