make script work under python3