extra: using empty? in some places.