added basic function call handling