added samplingInterval and tests