introduced another way for spying ajax calls