adding code and plots