refactored the profile index page for faster loading