change writetodb method arguments