refactorings based on review