only create 'shared' when needed