before scripts