Inject this function in the constructor