used executor to replace thread