ported to python 3. TODO: fix deploy_tools