updated empty() method before appending