refactored `before_script`