first work on DI provider
cleanup, error fixing