updating to include max interval