Implemented isEmpty and size