mimic: made py3k compatible