implement beacon generation