algebra and js