updated ratchet library