setting flags for registering so no duplicates can be made