added option to set entries per interval