implement profile updating, realign code