added factory with  for json request