Update 13-ResidualsRcode