compatible with scalararithmetic