removed duplicate code stuff