add mode attribute parsing