refactor de mefactor + bars