change interpreter instance creation to work well with dependency injection