added all of the error checking, new interval done