simplified the pipes somewhat