how does fan work