func as global