optimize for speed, tested OK

Added a pipeline stage