Get rid of intervals in favor of patterns
program seems to function now