Refactor with refresh