refactored assignment model