improve squarebrackets