added R scripts with classes