Adapted the samples to handle two users