added custom uri support