change to a smarter way for ajax path