if all is empty, logic is wrong