Add code snippets of stage 5