a few updates
updated to support switchable background operation