refactorings and little additions