Changed string switch to else-else if format