updated handleRouting, not finished