refont code for prepare -R