took advantage of the dependancy injection