updated precedence, errors, and library functions