add mode attribute for sojs