before plugin