tag factory from model
add reference to auto
fix deref temp shared ptr