modified controller to accept GET requests