used profile object instead as it seems more stable.