all checks in one function with options; check for duplicates and regions of size zero (still to test)