Beacon v2

move outside of if block