added urlToAction helper function