Changed "switch" style to remove dependency