A Goal-State Theory of Function Attributions