added apend function call when defined