beacon fuction finished