add some functions implementations in mathutils and matrix