remove comment and double brackets