make automatic generate files totally work