added ajax for sample and sentiment