added DB write operation