full functionality for dynamically adding and removing data