refactoring Profile.js