refactor mass assignment