using six instead of homegrown compat module