Added some math framework