if empty terminal assume size 1 for diff