added max interval sum