remove dupe code