validate and flag toggle implemented