fix dupe function?