add argument r
judge if the stead state is achieved
update parameters