adapting code to changes in ROScript