Added function call handling