add worker emits events, add/fix tests