Enh: some small refactoring the return