range methods now return smartpointers instead of raw pointers