check for undefined user first