Change elesif to case switch