remove repeated function