Definition function DI was fucking up everything. moving that to the link fct