added references, including sql