ajax api added, calculator bug fixed