fix passed function