removed unnecessary usage of functools.partial