refactor Id classes