remove duplicated derivative function
fix import statement and spacing
remove duplicated code and import it instead
consolidate and rename plotting script