tune statments
optimize url generation