found bugs with refresh updating code