better memory managment for the profiles