changed extend to automatically re-assign the extended service and keep it as shared or factory

alternative to #87