modified refreshBeacon func