added valiidate function in order to prevent anonymous writes/changes