Profile grammar improved