logic js update