modified the pre-build script