implemented most things, except for the actual request handling