save some code for reuse (and refactoring...)