refactoring assignments