'all' is defined but not used in this function, can the 2nd param be removed