added functionality so that if a sub row has an empty spot it will add any news subs to that row instead of appending them