set getSize() as const