Refactor the b/c checking