tested routing, improved query string functions