Updated with new method for custom URLs