fixing my code for py2/3 working happiness