subscribe write on db