adds ajax for routes