changed uri from String to long (amongst other things)