extracts route variables given the request