introduce test suite, fix a missing return keyword