fixed pipe error, made the positioning of pipes random