X-Bar: made more genernal