Updated some error checking... still parenthesis may be a problem