added ability to set path as selected
generate url dynamically