Revised to add url support