rewrote rest