refactor ids to classes