refactored beacon