remove debugging code, add template to api based url