added isEmpty, getSize, and print