removing tail