update the program to python3 and restful web service