latest working version... still suffers from unreliable background processes