Fixing up 1_rem_dup solution