add final code (add noise option in previous code) for problem set 3