refactor code, split injection method to injection class and create a injection interface