refactoring & commenting