version 1.4: change pipeN to arrry and fix bugs