adjusted index() in user.php