py3 style corrections