replace build before method in files by the class version