added functionality such that can have intervals longer than five minutes (UNTESTED)