refactor assignment done