add feature for fetch by id and tests