adding size() and fixing up examples for #283