added ajax funct and json parser