refactoring : view profile is separate from index.php