rm final replaced with prepare