add appendix A with code