add masterial and update index