updated id() method to prevent double dashes