working on R tests for stop instead of stopifnot