basic size function implemented, untested.