Updated to pre-process brackets