working on top and as a background task