modified add materials and finished delete and update materials