- profile interval query algorithm