Created codes and plots