added support for refreshOnchange option