added Q function to the parser