Analysis helper functions