Added the saveBracket function