adding sql references