move ids to inner class, cache typedId