Add methods to write DB