fixed, checked if first parameter is a function