fixed the runData missing values and cleaned up code