adding type annotations to old rips code