Changed to use DI