plz refactort