add next_square_a & next_curly_a
handle nesting
tests