added method getSize()