add part of workqueue code