Implemented recursive size method