add multithread worker and opt parse logic