Added changes to ratchet