remove x and y from g