updating code to work w/ python v3