refactoring the add flow towards not knowing hardcodedly about the
indices