try to use webworker
code reduce