sql adn r scripts updated