add weakFunction