added optional delegate method to notify when content changed