added listener for model change