removed repeated function