initial request code function.