Moved "fake request" code into its own function