preliminary setup for ajax request