added inject for struct