added beacon detection