add function to initialize request