refactor dummy code to prevent duplicates