added option to setOptions to avoid resetting view.