added getSize function