py2.7 compatible consolidated script