actually, it's working fine, except for mismatched parentheses