wrote a small number of tests, fixed incorrectly wrapped function