finished extension explanation
little bit of refactoring