added URI parsing