update logic and build file