better support push state
fancier template handling