fix for functions