added more functions, error reporting
added if and ==
ported computation to client side