added routing (bug exists)