adding pre_build and changing to state