updated unformat to allow nested brackets/multiple minus signs + fixed a typo