updated Ajax method