reorganize JS