remove unused square brackets