configuring ajax requests