added looping for riping process