rewrite of frog_corr