updated tests, added efficiency functions