remove deplicated code