use if instead of case for testing equivalency