reorganizing js