got rid of extra JS code