remove duplicated old code