bar recognition