change write process to serial dispath queue
update Tests