rewrite to use worker queue instead of pool