removed duplicate func