refactor runnablecaptorfactory to return concrete type