end() implemented