Program for testing interval