remove Py2.3 work-around
remove duplicated code