Refactored

potentially include interface to run if time