avg_fv working. adding avg_rv code