updated spinner class to support square braces