remove functools for compat with py2.4