Added interval setting. Not working yet