fixed functions switch