refactor ids for view