modularizing the background processes