finalize repository implementation