added  the empty() method