refactorings and update