commands package refactored to support pipelining