Added function calls to handle and respond to requests