add reference, appendix code