modified to ajax
resolved merge