func as param of another func