correct logic for multiple users