added example on factories and providers