saving template when he is changed