refactoring and license header