added emptiness functionality