Re-wrote tag diff func