autorefresh functionality added