Added CHECK and tests