use update instead of write, add more supported events
update readme