Add multithread to frontend