remove duplicate block of js