a few changes to try and reduce number of broken pipes I get
removed a stray &
starting to refactor next_piece