headers location problems..routing function