First attempt at writing a request factory