write registers