works for multiple parens but only calcs right if parens are at end