remove code duplicates 2.0