This function looks pretty much identical to the one in erbi_pool.. why not merge erbi_sup and erbi_pool (make erbi_pool implement supervisor behaviour)?