added getSize() function