Modified script to allow for multiple rrds