code sync for UI