[build] update prepareFunction()