State Function Vs Process Function