account refactor