added template, corrected the routing