refactores injection of depandencies