added plugin beforeSend method