make interval optional to resolve #5