rewrote creat-freq-map added inital not working code for nested-remdup