refactor profile panel