Source code for model