object and function must be defined