taking care of ajax request