assignment refactor