fixing extraneous square brackets