add the support for return value, passes all existing tests, has its own. no refactoring yet