useful prebuild and afterbuild added