Add switch method to make case statements easier.