made codelet use a shared_ptr