commented on the invoke function