refacto front for handling multi datasource