refactor code--multiple task framwork and http module