adding auto refresh