unintuitive to me that generate_sql for the indices would take 1 or 2 parameters rather than just 'n' parameters per indices -- but it serves its purpose well enough