Had a ideer for a A/C system

I cant remember how all the ac components work, but I believe part of the cooling of the air is when the refrigerant changes state.....liquid to gas then back to liquid again.....I think