init ajax factory