added check to make sure users are valid2