added ability to check "before"