refactor and tunning build

refactor and tunning build