refactoring & commenting.