added the empty() method