move backend initialization to di