added ajax sendRequest function