refactoring of helpers