modify isUser function