! move db calls out of ProfileHistory.controller.php