TODO: fix event for functions with overloads