Let the code work on python3