getSize method fixed