refactor + flagLoggeado