adding ability to prevent refresh