background mode seems to be working well, need to implement pipelining