You could remove 
float rate_add = rate_add_new; 
above and introduce it here