reorganize into single cycle and pipeline