manipulate URIs in controllers using lib