Adding profile management logic