adding appcache and state based routing