modify ast builder method for class